--双刃夸巧
local shuangrengkuaqiao = fk.CreateSkill{
    name = "mcdh_shuangrengkuaqiao",
}

local U = require "packages/utility/utility"
local lib = require "packages/mcdh/lib"

shuangrengkuaqiao:addEffect(fk.CardUseFinished,{
    can_trigger = function(self, event, target, player, data)
        return player:hasSkill(self) and target == player
    end,
    on_cost = function(self, event, target, player, data)
        local room = player.room
        local card = room:askForCard(player, 1, 1, true, self.name, true, ".", "#shuangrengkuaqiao")
        if #card  ~= 0 then
            self.cost_data = card
            return true
        end
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        room:recastCard(self.cost_data, player, self.name)
    end
})

Fk:loadTranslationTable {
    ["mcdh_shuangrengkuaqiao"] = "双刃夸巧",
    [":mcdh_shuangrengkuaqiao"] = "当你使用一张牌后，你可以重铸一张牌。",
    ["#shuangrengkuaqiao"] = "双刃夸巧:重铸一张牌",
}

return shuangrengkuaqiao